package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 登录信息表(Login)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-15 11:36:44
 */
@ApiModel("登录信息表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Login implements Serializable {
    private static final long serialVersionUID = -80098011889075558L;
        /**
    *主键
    * 登录id
    * isnull 1
    */
    @ApiModelProperty(value="登录id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String loginId;
    /**
    *主键
    * 注册手机
    * isnull 1
    */
    @ApiModelProperty(value="注册手机",position=2)
    private String loginPhone;

    /**
    * 登录昵称（刚注册时系统自动生成）
    * isnull 0
    */        @ApiModelProperty(value="登录昵称（刚注册时系统自动生成）",position=3)
    private String loginNickname;
    /**
    * 登录密码
    * isnull 0
    */        @ApiModelProperty(value="登录密码",position=4)
    private String loginPwd;
    /**
    * 登录角色（0：作者；1：读者）
    * isnull 0
    */        @ApiModelProperty(value="登录角色（0：作者；1：读者）",position=5)
    private Integer loginRole;
    /**
    * 注册时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="注册时间",position=6)
    private LocalDateTime registTime;
    /**
    * 注册成功默认头像
    * isnull 0
    */        @ApiModelProperty(value="注册成功默认头像",position=7)
    private String loginPic;
    /**
    * 登录信息更新时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        @ApiModelProperty(value="登录信息更新时间",position=8)
    private LocalDateTime updateTime;
    /**
    * 书架id
    * isnull 0
    */        @ApiModelProperty(value="书架id",position=9)
    private String bookshelfId;
        
    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }
        
    public String getLoginNickname() {
        return loginNickname;
    }

    public void setLoginNickname(String loginNickname) {
        this.loginNickname = loginNickname;
    }
        
    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }
        
    public Integer getLoginRole() {
        return loginRole;
    }

    public void setLoginRole(Integer loginRole) {
        this.loginRole = loginRole;
    }
        
    public String getLoginPhone() {
        return loginPhone;
    }

    public void setLoginPhone(String loginPhone) {
        this.loginPhone = loginPhone;
    }
        
    public LocalDateTime getRegistTime() {
        return registTime;
    }

    public void setRegistTime(LocalDateTime registTime) {
        this.registTime = registTime;
    }
        
    public String getLoginPic() {
        return loginPic;
    }

    public void setLoginPic(String loginPic) {
        this.loginPic = loginPic;
    }
        
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
        
    public String getBookshelfId() {
        return bookshelfId;
    }

    public void setBookshelfId(String bookshelfId) {
        this.bookshelfId = bookshelfId;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"loginId\":" + loginId +
                                  " ,\"loginNickname\":" + loginNickname +
                            " ,\"loginPwd\":" + loginPwd +
                            " ,\"loginRole\":" + loginRole +
                            " ,\"loginPhone\":" + loginPhone +
                            " ,\"registTime\":" + registTime +
                            " ,\"loginPic\":" + loginPic +
                            " ,\"updateTime\":" + updateTime +
                            " ,\"bookshelfId\":" + bookshelfId +
                  '}';
    }


}
